const {qiniuUpload} = require('../lib/utils')
      config = require('../config/config')
class Admin{
    async testQiniu(){
        const qiniu = config.qiniu;
                        try {
                            const imgData = await qiniuUpload({
                                url:item.imgUrl,
                                bucket:qiniu.bucket.tximg.bucket_name,
                                ak:qiniu.keys.ak,
                                sk:qiniu.keys.sk,
                                ext:'.jpg'
                            })
                            if(imgData.key){
                                item.imgKey = imgData.key
                            }
                        } catch (error) {
                            console.log(error)
                        }
    }
}      